﻿@model RiverCruise.Models.Shared.ModalModel

<div id="partialModal" class="modal fade">
    <div class="modal-dialog">
        <div class="modal-content">
            <div class="modal-header">
                <button type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">&times;</span></button>
                <h4 class="modal-title">@Model.Title</h4>
            </div>
            <div class="modal-body">
                @Model.Body
            </div>
            <div class="modal-footer">
                @{
                    var cssclass = "";
                }

                @using(Html.BeginForm(Model.Action, Model.Controller, FormMethod.Post, new { @class = cssclass}))
                {
                    foreach (var argument in Model.Arguments)
                    {
                        <input type="hidden" id="@argument.Key" name="@argument.Key" value="@argument.Value"/>
                    }
                    
                    @Html.AntiForgeryToken()
                    <button type="button" class="btn btn-default" data-dismiss="modal">Cancel</button>
                    <button type="submit" class="btn btn-primary">Confirm</button>
                }
            </div>
        </div>
    </div>
</div>